import requests
from pyquery import PyQuery as pq

# 抓取百度首页title内容   类似phpquery  针对html进行类似 Jquery的操作dom
http_resp = requests.get("http://www.baidu.com")
text  = http_resp.content.decode('utf-8')

dom_root = pq(text)

print(dom_root.find("title").text())
